home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE22 / CLINIC / GenMinU2.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-04-06  |  574 b   |  39 lines

  1. unit GenMinU2;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
  7.  
  8. type
  9.   TForm2 = class(TForm)
  10.   private
  11.     procedure WMSysCommand(var Msg: TWMSysCommand);
  12.       message wm_SysCommand;
  13.   public
  14.     { Public declarations }
  15.   end;
  16.  
  17. var
  18.   Form2: TForm2;
  19.  
  20. implementation
  21.  
  22. uses
  23.   GenVars;
  24.  
  25. {$R *.DFM}
  26.  
  27. procedure TForm2.WMSysCommand(var Msg: TWMSysCommand);
  28. begin
  29.   if Msg.CmdType and $FFF0 = sc_Icon then
  30.   begin
  31.     Application.Minimize;
  32.     MinForm := Self
  33.   end
  34.   else
  35.     inherited
  36. end;
  37.  
  38. end.
  39.